#pragma once

#include "gameobject.h"
#include "Events\IListener.h"

class Gate : public GameObject, public IListener
{
private:

	bool StartOpen;
	bool retract;
	bool vertical;
	int minHeight;
	int maxHeight;

public:
	// Constructor
	Gate(void);

	// Destructor
	~Gate(void);

	//////////////////////////////////////////////////
	// Accessors:
	inline bool IsVertical(void) const { return vertical; }
	inline int GetMinHeight(void) const { return minHeight; }
	inline int GetMaxHeight(void) const { return maxHeight; }
	inline int GetStartOpen(void) const { return StartOpen; }

	//////////////////////////////////////////////////
	// Mutators:
	void SetVertical(bool vertical);
	void SetMinHeight(int minHeight);
	void SetMaxHeight(int maxHeight);
	void Retract(bool retract);
	void SetStartOpen(bool Open);

	//////////////////////////////////////////////////
	// GameObject Methods:
	void Update(float deltaTime)									override;
	void Render(void) const											override;
	void HandleCollision(GameObject& other, CollisionInfo& info)	override;

	//////////////////////////////////////////////////
	// IListener Methods:
	void HandleEvent(Event* e)										override;
};

